﻿<?xml version="1.0" encoding="utf-8"?>

<xsd:schema id="Instructions"
    targetNamespace="http://metalx.org/Ibm/Ppc/Instructions"
    elementFormDefault="qualified"
    xmlns="http://metalx.org/Ibm/Ppc/Instructions"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">

	<xsd:element name="platform">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="processor">
					<xsd:complexType>
						<xsd:choice maxOccurs="unbounded">
							<!--A-->
							<xsd:element name="A">
								<xsd:complexType>
									<xsd:attribute name="Name" type="xsd:string"/>
									<xsd:attribute name="OPCD" type="xsd:byte"/>
									<xsd:attribute name="FRT" type="xsd:string"/>
									<xsd:attribute name="FRA" type="xsd:string"/>
									<xsd:attribute name="FRB" type="xsd:string"/>
									<xsd:attribute name="FRC" type="xsd:string"/>
									<xsd:attribute name="XO" type="xsd:unsignedShort"/>
									<xsd:attribute name="Rc" type="xsd:string"/>
								</xsd:complexType>
							</xsd:element>

							<!--B-->
							<xsd:element name="B">
								<xsd:complexType>
									<xsd:attribute name="Name" type="xsd:string"/>
									<xsd:attribute name="OPCD" type="xsd:byte"/>
									<xsd:attribute name="BO" type="xsd:string"/>
									<xsd:attribute name="BI" type="xsd:string"/>
									<xsd:attribute name="BD" type="xsd:string"/>
								</xsd:complexType>
							</xsd:element>

							<!--D-->
							<xsd:element name="D">
								<xsd:complexType>
									<xsd:attribute name="Name" type="xsd:string"/>
									<xsd:attribute name="OPCD" type="xsd:byte"/>
									<xsd:attribute name="RT" type="xsd:string"/>
									<xsd:attribute name="BF" type="xsd:string"/>
									<xsd:attribute name="L" type="xsd:string"/>
									<xsd:attribute name="RA" type="xsd:string"/>
									<xsd:attribute name="D" type="xsd:string"/>
									<xsd:attribute name="SI" type="xsd:string"/>
								</xsd:complexType>
							</xsd:element>

							<!--I-->
							<xsd:element name="I">
								<xsd:complexType>
									<xsd:attribute name="Name" type="xsd:string"/>
									<xsd:attribute name="OPCD" type="xsd:byte"/>
									<xsd:attribute name="LI" type="xsd:string"/>
								</xsd:complexType>
							</xsd:element>

							<!--SC-->
							<xsd:element name="SC">
								<xsd:complexType>
									<xsd:attribute name="Name" type="xsd:string"/>
									<xsd:attribute name="OPCD" type="xsd:byte"/>
									<xsd:attribute name="LEV" type="xsd:string"/>
								</xsd:complexType>
							</xsd:element>

							<!--X-->
							<xsd:element name="X">
								<xsd:complexType>
									<xsd:attribute name="Name" type="xsd:string"/>
									<xsd:attribute name="OPCD" type="xsd:byte"/>
									<xsd:attribute name="RT" type="xsd:string"/>
									<xsd:attribute name="RA" type="xsd:string"/>
									<xsd:attribute name="RB" type="xsd:string"/>
									<xsd:attribute name="XO" type="xsd:unsignedShort"/>
									<xsd:attribute name="EH" type="xsd:string"/>
								</xsd:complexType>
							</xsd:element>

							<!--XFX-->
							<xsd:element name="XFX">
								<xsd:complexType>
									<xsd:attribute name="Name" type="xsd:string"/>
									<xsd:attribute name="OPCD" type="xsd:byte"/>
									<xsd:attribute name="RT" type="xsd:string"/>
									<xsd:attribute name="spr" type="xsd:string"/>
									<xsd:attribute name="XO" type="xsd:unsignedShort"/>
								</xsd:complexType>
							</xsd:element>

							<!--XL-->
							<xsd:element name="XL">
								<xsd:complexType>
									<xsd:attribute name="Name" type="xsd:string"/>
									<xsd:attribute name="OPCD" type="xsd:byte"/>
									<xsd:attribute name="BT" type="xsd:string"/>
									<xsd:attribute name="BA" type="xsd:string"/>
									<xsd:attribute name="BB" type="xsd:string"/>
									<xsd:attribute name="XO" type="xsd:unsignedShort"/>
									<xsd:attribute name="LK" type="xsd:string"/>
								</xsd:complexType>
							</xsd:element>

							<!--XO-->
							<xsd:element name="XO">
								<xsd:complexType>
									<xsd:attribute name="Name" type="xsd:string"/>
									<xsd:attribute name="OPCD" type="xsd:byte"/>
									<xsd:attribute name="RT" type="xsd:string"/>
									<xsd:attribute name="RA" type="xsd:string"/>
									<xsd:attribute name="RB" type="xsd:string"/>
									<xsd:attribute name="OE" type="xsd:string"/>
									<xsd:attribute name="XO" type="xsd:unsignedShort"/>
									<xsd:attribute name="Rc" type="xsd:string"/>
								</xsd:complexType>
							</xsd:element>
						</xsd:choice>
					</xsd:complexType>
				</xsd:element>
			</xsd:sequence>

		</xsd:complexType>
	</xsd:element>

</xsd:schema>
